Skip to content

fix(ci/eval-stats): resolve prResult symlink#404967

Merged
Mic92 merged 2 commits intoNixOS:masterfrom
hsjobeki:ci-fix-report
May 7, 2025
Merged

fix(ci/eval-stats): resolve prResult symlink#404967
Mic92 merged 2 commits intoNixOS:masterfrom
hsjobeki:ci-fix-report

Conversation

@hsjobeki
Copy link
Contributor

@hsjobeki hsjobeki commented May 7, 2025

Fixes the performance stats report.

The problem that can be observed is that the prResult seems to not contain a /stats subdirectory. So also this PR should also omit the performance report, because the eval.yaml from master is executed.

I tested the solution here

This seems to be caused because prResult is a symlink pointing into the nix-store. Weirdly calling Path(prResult).resolve() in python inside the derivation doesn't work.

in constrast i now used realpath directly which works.

I didn't manage to find the exact root-cause why realpath and resolve() behave differently. Here are some of my guesses:

  • realpath (shell): resolves symlinks fully and immediately, returning an absolute path to the actual directory or file.
  • Path.resolve() (Python): attempts the same, but behaves more conservatively
  • The Python interpreter runs in a sandboxed environment, where symlink resolution doesn't always behave as in normal environments.

Things done

  • Fixed resolving the stats directory correctly
  • Alphabetical sorting of the output
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs backport release-24.11 labels May 7, 2025
@Mic92 Mic92 merged commit 3de7c50 into NixOS:master May 7, 2025
33 of 36 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented May 7, 2025

Backport failed for release-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-24.11
git worktree add -d .worktree/backport-404967-to-release-24.11 origin/release-24.11
cd .worktree/backport-404967-to-release-24.11
git switch --create backport-404967-to-release-24.11
git cherry-pick -x c8276114ac18237c8fcf5a2e416578aab58eb393 4f64ebd02b0cf1623bf4bf13a27a7a2d1b186b2e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants